/*
    频道请求模块
*/

import request from "@/utils/request";

export const GetAllChannels = () => {
    return request({
        method: 'GET',
        url: '/v1_0/channels'
    })
}

// 修改模块
export const AddMyChannels = (channel) => {
    return request({
        method: 'PATCH',
        url: '/v1_0/user/channels',
        data: { 'channels': [channel] }
    })
}

//去掉频道模块
export const DeleteMyChannels = (channel) => {
    return request({
        method: 'DELETE',
        url: `/v1_0/user/channels/${channel.id}`
    })
}